from aip import AipOcr

APP_ID = '10680895'
API_KEY = 'xQMP5NFo0d6Swtr7WrVG0s0o'
SECRET_KEY = 'YHCIXxCjyTTvgUP4gCEreTbrmtEh7HpW'

client = AipOcr(APP_ID, API_KEY, SECRET_KEY)


def test_test():
    # image = get_file_content("static/article.jpg")
    image = get_file_content("static/article.jpg")
    ret = client.basicGeneral(image)

    return ret


def get_file_content(file_path):
    with open(file_path, 'rb') as fp:
        return fp.read()

